package com.example.pay.service;
import com.alibaba.dubbo.config.annotation.Service;
import com.example.service.RpcAlipayService;
import com.example.utils.Constants;
import com.example.utils.MqUtils;
import com.example.vo.OrderMessageVo;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

@Component
@Service(interfaceClass= RpcAlipayService.class)
public class RpcAlipayServiceImpl implements RpcAlipayService {

    @Resource
    private MqUtils mqUtils;

    @Override
    public void upDateOrder(String orderNo) throws Exception {
        OrderMessageVo orderMessageVo=new OrderMessageVo();
        orderMessageVo.setOrderNo(orderNo);
        mqUtils.sendMessage(Constants.QueueName.TO_UPDATED_ORDER_QUEUE, orderMessageVo);
    }
}
